package com.chis.ms;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class Pqf {


    public static void main(String[] args) throws Exception {
        File file1 = new File("C:\\Users\\wlj\\Desktop\\pqf\\12.txt");
        FileReader m = null;
        try {
            m = new FileReader(file1);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        BufferedReader reader = new BufferedReader(m);
        Map<String,String[]> map = new HashMap<>();
        while (true) {
            String nextline = null;
            try {
                nextline = reader.readLine();
                if(nextline != null){
                    String[] strings = nextline.split("#");
                    map.put(strings[1],strings);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (nextline == null) break;
        }
        for(String s:map.keySet()){
            String[] strings = map.get(s);
            System.out.println(s+":  "+strings[0]+","+strings[1]+","+strings[2]+","+strings[3]);
        }

    }
}
